1 KEY OFF
2 SOUND ON:PLAY "mb"
3 REM BLACKJACK - TANDY 1000
4 REM COPYRIGHT 1989 BROOKS DEFOREST
5 SCREEN 1:SCREEN 2:SCREEN 0
10 COLOR 3,1,1
15 CLS
16 RANDOMIZE TIMER
20 DIM DECK(52):DIM PL1(25):DIM PL2(25):DIM PL3(25):DIM PL4(25):DIM DECK$(52)
21 CASH1=100:CASH2=100:CASH3=100:LOST1=0:LOST2=0:LOST3=0:WIN1=0:WIN2=0:WIN3=0:BET1=0:BET2=0:BET3=0
25 REM CLUBS,DIAMONDS,ACES,SPADES
30 DATA AC,1C,2C,3C,4C,5C,6C,7C,8C,9C,10C,JC,QC,KC
35 DATA AD,1D,2D,3D,4D,5D,6D,7D,8D,9D,10D,JD,QD,KD
40 DATA AA,1A,2A,3A,4A,5A,6A,7A,8A,9A,10A,JA,QA,KA
45 DATA AS,1S,2S,3S,4S,5S,6S,7S,8S,9S,10S,JS,QS,KS
50 RESTORE 30:FOR DECK=1 TO 50:READ DECK$(DECK):NEXT
51 GOSUB 55:GOTO 75
55 REM SHUFFLE DECK
56 NOISE 7,15,40
60 COLOR 7:LOCATE 1,1:PRINT "SUFFLING DECK":FOR SHUF=1 TO 50
61 FRST=FIX(RND*50):IF FRST=0 OR FRST=51 THEN 61
62 NW=FIX(RND*50):IF NW=0 OR NW=FRST OR NW=51 THEN 62
63 D1$=DECK$(FRST):DECK=NW:D2$=DECK$(DECK)
65 DECK$(FRST)=D2$:DECK$(NW)=D1$:NEXT:LOCATE 1,1:PRINT "             "
70 RETURN
75 CLS
80 FOR V=15 TO 0 STEP -1:NOISE 4,V,.5:NOISE 6,V,.7:NEXT:COLOR 0,7:FOR Y=7 TO 16:LOCATE Y,20:PRINT STRING$(40,32):NEXT
85 LOCATE 7,21:PRINT "       M A X     - B L A C K J A C K"
90 LOCATE 8,20:PRINT STRING$(40,45)
95 LOCATE 10,25:PRINT "MAIN MENU:"
96 COLOR 0,7
100 LOCATE 12,25:PRINT "(1)-ONE PLAYER v MAX"
105 LOCATE 13,25:PRINT "(2)-ONE PLAYER v ONE PLAYER"
110 LOCATE 14,25:PRINT "(3)-TWO PLAYERS v MAX"
115 LOCATE 15,25:PRINT "(4)-QUIT GAME"
120 COLOR 7,1:PLAY "A40"
121 RANDOMIZE TIMER
122 TURN=0
125 A$=INKEY$:IF A$="" THEN 125
126 IF A$="1" THEN PLAYERS=1:GOTO 200
127 IF A$="2" THEN PLAYERS=2:GOTO 200
128 IF A$="3" THEN PLAYERS=3:GOTO 200 ELSE IF A$="4" THEN CLS:STOP
129 NOISE 0,15,1:GOTO 125
200 CLS:FOR V=15 TO 0 STEP -1:SOUND 600,1,V,0:NEXT
201 PRINT "Enter player(s) names:":PRINT:IF PLAYERS=1 THEN PRINT "Ok player one enter your name:";:COLOR 3:INPUT "",N1$:N2$="Max":GOTO 205
202 PRINT "Player one enter your name first:";:COLOR 3:INPUT "",N1$:COLOR 7:PRINT "Now you player two:";:COLOR 3:INPUT "",N2$:N3$="Max":GOTO 205
205 REM MAIN GAME STARTS HERE
206 COLOR 4,1:CLS:COLOR 4,2
207 COLOR 4,0:TURN=TURN+1:Y=2:FOR O=1 TO 9:LOCATE O,1:PRINT STRING$(80,32):NEXT:SO=0:Y=2:FOR V=15 TO 0 STEP -1:SOUND 100,1,V,0:SOUND 900,.8,V,0:NEXT
208 IF TURN=1 THEN CASH=CASH1:BET=BET1:WIN=WIN1:LOST=LOST1 ELSE IF TURN=2 THEN CASH=CASH2:BET=BET2:WIN=WIN2:LOST=LOST2 ELSE IF TURN=3 THEN CASH=CASH3:BET=BET3:WIN=WIN3:LOST=LOST3
209 COLOR 4,0:BET=0
210 FOR O=2 TO 8
215 LOCATE O,5:PRINT STRING$(10,178)
220 LOCATE O,20:PRINT STRING$(10,178)
225 LOCATE O,35:PRINT STRING$(10,178)
230 LOCATE O,50:PRINT STRING$(10,178)
235 LOCATE O,65:PRINT STRING$(10,178)
240 NEXT:COLOR 14,1
245 LOCATE 10,1:PRINT STRING$(80,205)
246 WON=WIN
250 IF TURN=1 THEN N$=N1$ ELSE IF TURN=2 THEN N$=N2$ ELSE N$=N3$
255 X=LEN(N$)/2:X=40-X:COLOR 2:LOCATE 10,X:PRINT N$
260 COLOR 15:LOCATE 12,5:PRINT "Cash:$";:COLOR 13:PRINT CASH"      ":COLOR 15
265 LOCATE 14,5:PRINT "Won:$";:COLOR 13:PRINT WON"   ":COLOR 15
270 LOCATE 16,5:PRINT "Lost:$";:COLOR 13:PRINT LOST"  ":COLOR 15
275 LOCATE 18,5:PRINT "Bet:$";:COLOR 13:PRINT BET"  "
280 COLOR 3:LOCATE 13,40:PRINT "(1)-Hit"
285 LOCATE 15,40:PRINT "(2)-Stick"
290 LOCATE 17,40:PRINT "(3)-Bet up"
295 COLOR 14:LOCATE 20,1:PRINT STRING$(80,205)
298 IF BET=0 AND MAX=1 THEN LOCATE 21,1:PRINT "You have not yet placed a bet":PRINT "How much to bet:";:COLOR 2:FOR P=1 TO 600:NEXT:BET=FIX(RND*CASH/2):BET=BET*2:PRINT BET:FOR P=1 TO 600:NEXT:LOCATE 21,1:PRINT STRING$(160,32):CASH=CASH-BET:GOTO 8000
299 IF BET=0 THEN LOCATE 21,1:PRINT "You have not yet placed a bet":PRINT "How much to bet:";:COLOR 2:INPUT "",BT:IF BT>CASH OR BT=0 THEN LOCATE 22,1:PRINT STRING$(80,32):GOTO 299 ELSE LOCATE 21,1:PRINT STRING$(160,32):BET=BT:CASH=CASH-BET:GOTO 8000
300 IF TURN=1 AND BUST1=1 THEN 325 ELSE IF TURN=2 AND BUST2=1 THEN 325 ELSE IF TURN=3 AND BUST3=1 THEN 325 ELSE IF TURN=2 AND PLAYERS=1 THEN 6000 ELSE IF TURN=3 AND PLAYERS=3  THEN 6000
301 A$=INKEY$:IF A$="" THEN 301
305 IF A$="1" THEN 400
310 IF A$="2" THEN 600
315 IF A$="3" THEN 700
320 NOISE 0,15,1:GOTO 301
325 COLOR 60:LOCATE 22,10:PRINT "Y O U   H A V E    B U S T !"
330 FOR A=1 TO 130:PALETTE 7,RND*15:NEXT
335 IF PLAYERS=1 AND TURN=2 THEN COLOR 7:GOTO 650 ELSE IF PLAYERS=2 AND TURN=2 THEN COLOR 7:GOTO 650
340 IF PLAYERS=3 AND TURN=3 THEN COLOR 7:GOTO 650
345 LOCATE 22,1:PRINT STRING$(80,32):COLOR 4,0:PALETTE 7,7:GOTO 600
400 REM HIT!
404 IF DECK>50 THEN DECK=1
405 D2=DECK:DECK=DECK+1:NWCARD=DECK:NWCARD$=DECK$(NWCARD)
410 IF TURN=1 THEN PL1=PL1+1:PL1$(PL1)=NWCARD$ ELSE IF TURN=2 THEN PL2=PL2+1:PL2$(PL2)=NWCARD$ ELSE IF TURN=3 THEN PL3=PL3+1:PL3$(PL3)=NWCARD$:GOTO 445
411 GOTO 445
415 IF TURN=1 THEN CARDS=PL1:FOR CARD=1 TO CARDS:PL1=CARD:CARD$(CARD)=PL1$(PL1):NEXT:PL1=CARDS
416 IF TURN=2 THEN CARDS=PL2:FOR CARD=1 TO CARDS:PL2=CARD:CARD$(CARD)=PL2$(PL2):NEXT:PL2=CARDS
417 IF TURN=3 THEN CARDS=PL3:FOR CARD=1 TO CARDS:PL3=CARD:CARD$(CARD)=PL3$(PL3):NEXT:PL3=CARDS
418 AMOUNT1=0:AMOUNT2=0
420 FOR CARD=1 TO CARDS:C$=CARD$(CARD)
421 IF C$="1C" OR C$="1D" OR C$="1A" OR C$="1S" THEN AMOUNT1=AMOUNT1+1
422 IF C$="2C" OR C$="2D" OR C$="2A" OR C$="2S" THEN AMOUNT1=AMOUNT1+2
423 IF C$="3C" OR C$="3D" OR C$="3A" OR C$="3S" THEN AMOUNT1=AMOUNT1+3
424 IF C$="4C" OR C$="4D" OR C$="4A" OR C$="4S" THEN AMOUNT1=AMOUNT1+4
425 IF C$="5C" OR C$="5D" OR C$="5A" OR C$="5S" THEN AMOUNT1=AMOUNT1+5
426 IF C$="6C" OR C$="6D" OR C$="6A" OR C$="6S" THEN AMOUNT1=AMOUNT1+6
427 IF C$="7C" OR C$="7D" OR C$="7A" OR C$="7S" THEN AMOUNT1=AMOUNT1+7
428 IF C$="8C" OR C$="8D" OR C$="8A" OR C$="8S" THEN AMOUNT1=AMOUNT1+8
429 IF C$="9C" OR C$="9D" OR C$="9A" OR C$="9S" THEN AMOUNT1=AMOUNT1+9
430 IF C$="10C" OR C$="10D" OR C$="10A" OR C$="10S" THEN AMOUNT1=AMOUNT1+10
431 IF C$="JC" OR C$="JD" OR C$="JA" OR C$="JS" THEN AMOUNT1=AMOUNT1+10
432 IF C$="QC" OR C$="QD" OR C$="QA" OR C$="QS" THEN AMOUNT1=AMOUNT1+10
433 IF C$="KC" OR C$="KD" OR C$="KA" OR C$="QS" THEN AMOUNT1=AMOUNT1+10
434 IF C$="AC" OR C$="AD" OR C$="AA" OR C$="AS" THEN AMOUNT2=AMOUNT2+AMOUNT1:AMOUNT1=AMOUNT1+11:AMOUNT2=AMOUNT2+1
435 NEXT
436 IF AMOUNT1>21 THEN 437 ELSE 440
437 IF TURN=1 THEN BUST1=1 ELSE IF TURN=2 THEN BUST2=1 ELSE IF TURN=3 THEN BUST3=1
440 IF TURN=1 THEN P1=AMOUNT1 ELSE IF TURN=2 THEN P2=AMOUNT1 ELSE IF TURN=3 THEN P3=AMOUNT1
441 GOTO 300
445 IF TURN=1 THEN SO=PL1 ELSE IF TURN=2 THEN SO=PL2 ELSE IF TURN=3 THEN SO=PL3
450 IF SO=1 THEN X=5 ELSE IF SO=2 THEN X=20 ELSE IF SO=3 THEN X=35 ELSE IF SO=4 THEN X=50 ELSE IF SO=5 THEN X=65
451 IF SO=6 THEN Y=3:X=6 ELSE IF SO=7 THEN X=21 ELSE IF SO=8 THEN X=36 ELSE IF SO=9 THEN X=51 ELSE IF SO=10 THEN X=66
455 FOR V=9 TO 15:NOISE 4,V,.5:NOISE 7,V,.5:NEXT:N$=NWCARD$:IF LEN(N$)>2 THEN 456 ELSE NUM$=LEFT$(N$,1):SUIT$=RIGHT$(N$,1):GOTO 457
456 NUM$=LEFT$(N$,2):SUIT$=RIGHT$(N$,1)
457 NUM=VAL(NUM$):IF SUIT$="C" THEN S=5 ELSE IF SUIT$="D" THEN S=4 ELSE IF SUIT$="S" THEN S=6 ELSE S=3
458 COLOR 7:FOR O=Y TO Y+6:LOCATE O,X:PRINT STRING$(10,219):NEXT:IF NUM$="K" OR NUM$="J" OR NUM$="Q" THEN 463 ELSE IF NUM$="A" THEN 490
459 COLOR 0,7:LOCATE Y+1,X+1:PRINT NUM:LOCATE Y+5,X+6:PRINT NUM
460 IF S=3 OR S=4 THEN COLOR 4 ELSE COLOR 0
461 LOCATE Y+2,X+4:PRINT CHR$(S):LOCATE Y+3,X+6:PRINT CHR$(S)
462 COLOR 7,1:GOTO 415
463 COLOR 8,7:IF NUM$="J" THEN LOCATE Y+1,X+1:PRINT "JACK":LOCATE Y+5,X+6:PRINT "JACK":GOTO 460
464 IF NUM$="Q" THEN LOCATE Y+1,X+1:PRINT "QUEEN":LOCATE Y+5,X+5:PRINT "QUEEN":GOTO 460
465 LOCATE Y+1,X+1:PRINT "KING":LOCATE Y+5,X+6:PRINT "KING":GOTO 460
490 COLOR 0,7:LOCATE Y+1,X+1:PRINT "ACE":LOCATE Y+5,X+7:PRINT "ACE":GOTO 460
600 REM STICK!
601 FOR V=15 TO 10 STEP -1:NOISE 4,V,1:SOUND 500,.5,V,0:NEXT
605 IF TURN=1 THEN TOT1=AMOUNT1 ELSE IF TURN=2 THEN TOT2=AMOUNT1 ELSE IF TURN=3 THEN TOT3=AMOUNT1
610 IF PLAYERS=1 AND TURN=2 THEN 650 ELSE IF TURN=3 AND PLAYERS=3 THEN 650 ELSE IF TURN=2 AND PLAYERS=2 THEN 650
614 IF TURN=1 AND PLAYERS=1 THEN MAX=1 ELSE IF TURN=2 AND PLAYERS=3 THEN MAX=1 ELSE MAX=0
615 AMOUNT1=0:AMOUNT=0:COLOR 4,0:GOTO 207
650 PALETTE 7,7:IF BUST1=1 AND BUST2=1 AND PLAYERS=1 THEN 800
651 IF BUST1=1 AND BUST2=1 AND PLAYERS=2 THEN 800
655 IF BUST1=1 AND BUST2=1 AND BUST3=0 AND PLAYERS=3 THEN 900
660 IF BUST1=1 AND BUST2=0 AND PLAYERS=1 THEN 900
661 IF PLAYERS=3 AND BUST1=0 AND BUST2=0 AND BUST3=1 AND TOT1<TOT2 THEN 1100
662 IF PLAYERS=3 AND BUST1=0 AND BUST2=0 AND BUST3=1 AND TOT1>TOT2 THEN 1000
665 IF BUST1=1 AND BUST2=0 AND BUST3=1 AND PLAYERS=3 THEN 1000
666 IF BUST1=0 AND BUST2=1 AND PLAYERS=2 THEN 1100
670 IF BUST1=1 AND BUST2=0 AND PLAYERS=2 THEN 1000
671 IF BUST1=0 AND BUST2=1 AND PLAYERS=1 THEN 1100
672 IF BUST1=0 AND BUST2=1 AND BUST3=1 AND PLAYERS=3 THEN 1100
673 IF BUST1=0 AND BUST2=0 AND PLAYERS=1 THEN IF TOT1>TOT2 THEN 1100
674 IF BUST1=0 AND BUST2=0 AND PLAYERS=2 THEN IF TOT1>TOT2 THEN 1100
675 IF BUST1=0 AND BUST2=0 AND BUST3=0 AND PLAYERS=3 THEN IF TOT1>TOT2 AND TOT1>TOT3 THEN 1100
676 IF BUST1=0 AND BUST2=0 AND BUST3=0 AND PLAYERS=3 THEN IF TOT2>TOT1 AND TOT2>TOT3 THEN 1000
677 IF BUST1=0 AND BUST2=0 AND BUST3=0 AND PLAYERS=3 THEN IF TOT3>TOT1 AND TOT3>TOT2 THEN 900
678 IF BUST1=1 AND BUST2=0 AND BUST3=0 AND PLAYERS=3 THEN IF TOT2>TOT3 AND TOT3<TOT2 THEN 1000
679 IF BUST1=1 AND BUST2=0 AND BUST3=0 AND PLAYERS=3 THEN IF TOT2<TOT3 AND TOT3>TOT2 THEN 900
680 IF BUST1=0 AND BUST2=1 AND BUST3=0 AND PLAYERS=3 THEN IF TOT1<TOT3 AND TOT3>TOT1 THEN 900
681 IF BUST1=0 AND BUST2=1 AND BUST3=0 AND PLAYERS=3 THEN IF TOT1>TOT3 AND TOT3<TOT1 THEN 1100
682 IF BUST1=0 AND BUST2=0 AND PLAYERS=1 THEN IF TOT1<TOT2 THEN 900
683 IF BUST1=0 AND BUST2=0 AND PLAYERS=2 THEN IF TOT1<TOT2 THEN 1000
684 GOTO 900
700 REM UP BET!
705 COLOR 14:LOCATE 21,1:PRINT "How much to add to the bet you placed:"
706 FOR V=15 TO 10 STEP -.5:SOUND V*19,1,V,0:SOUND V*8,1,V,0:NEXT
710 LOCATE 22,1:PRINT "How much $";:COLOR 2:INPUT "",MORE
715 IF MORE>CASH THEN LOCATE 22,1:PRINT STRING$(80,32):COLOR 14:GOTO 710
720 IF MORE<1 THEN LOCATE 21,1:PRINT STRING$(160,32):GOTO 300
725 CASH=CASH-MORE:BET=BET+MORE:MORE=0:IF TURN=1 THEN BET1=BET:CASH1=CASH ELSE IF TURN=2 THEN CASH2=CASH:BET2=BET ELSE IF TURN=3 THEN BET3=BET:CASH3=CASH
730 LOCATE 21,1:PRINT STRING$(160,32)
735 GOTO 260
800 COLOR 12:LOCATE 21,1:PRINT "All players in this game have bust!":FOR S=600 TO 100 STEP -15:SOUND S,1,15,0:NEXT
801 FOR P=1 TO 1000:NEXT
816 LOST1=LOST1+BET1:LOST2=LOST2+BET2:LOST3=LOST3+BET3
820 GOTO 5000
899 END
900 COLOR 12:LOCATE 21,1:PRINT "I win this game!":FOR V=15 TO 0 STEP -1:SOUND 900,1,V,0:NEXT
901 IF PLAYERS=1 THEN LOST1=LOST1+BET1:WIN2=WIN2+BET2:CASH2=CASH2+(BET2*2) ELSE LOST1=LOST1+BET1:LOST2=LOST2+BET2:WIN3=WIN3=BET3:CASH3=CASH3+(BET3*2)
902 FOR P=1 TO 1000:NEXT
915 GOTO 5000
1000 COLOR 14:LOCATE 21,1:PRINT "Player two wins the game.":FOR V=15 TO 0 STEP -1:SOUND 700,1,V,0:SOUND 300,1,V,1:NEXT
1001 FOR P=1 TO 1000:NEXT
1005 LOCATE 1,1
1016 LOST1=LOST1+BET1:WIN2=WIN2+BET2:CASH2=CASH2+(BET2*2):LOST3=LOST3+BET3
1020 GOTO 5000
1100 COLOR 14:LOCATE 21,1:PRINT "Player one you win this game.":FOR V=15 TO 0 STEP -1:SOUND 500,1,V,0:SOUND 200,1,V,1:NEXT
1101 FOR P=1 TO 1000:NEXT
1111 WIN1=WIN1+BET1:CASH1=CASH1+(BET1*2):LOST2=LOST2+BET2:LOST3=LOST3+BET3
1120 GOTO 5000
5000 REM
5001 PL1=0:PL2=0:PL3=0
5002 BUST1=0:BUST2=0:BUST3=0
5003 D2=0:DECK=0
5005 LOCATE 21,1:PRINT STRING$(160,32):COLOR 7:PALETTE 7,7
5010 IF PLAYERS=1 AND CASH1=0 THEN LOCATE 21,1:PRINT "Player one you have no money left:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5015 IF PLAYERS=2 AND CASH1=0 AND CASH2=0 THEN LOCATE 21,1:PRINT "Both of you have no money left with which to play:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5020 IF PLAYERS=3 AND CASH1=0 AND CASH2=0 AND CASH3<>0 THEN LOCATE 21,1:PRINT "Both players have no money for another game:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5025 IF PLAYERS=1 AND CASH2=0 THEN LOCATE 21,1:PRINT "I've been bankrupt! You have taken all of my money:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5026 IF PLAYERS=3 AND CASH1=0 AND CASH3=0 AND CASH2<>0 THEN LOCATE 21,1:PRINT "Player one and I have no more money:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5027 IF PLAYERS=3 AND CASH2=0 AND CASH3=0 AND CASH1<>0 THEN LOCATE 21,1:PRINT "Player two and I have no more money left:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5030 IF PLAYERS=3 AND CASH3=0 AND CASH1<>0 AND CASH2<>0 THEN LOCATE 21,1:PRINT "I've got no more money so i will leave the game:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9100
5035 IF PLAYERS=3 AND CASH1=0 AND CASH2<>0 AND CASH3<>0 THEN LOCATE 21,1:PRINT "Player one must leave the game:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9200
5040 IF PLAYERS=3 AND CASH2=0 AND CASH1<>0 AND CASH3<>0 THEN LOCATE 21,1:PRINT "Player two must leave the game:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9300
5045 IF PLAYERS=3 AND CASH1=0 AND CASH2=0 AND CASH3=0 THEN LOCATE 21,1:PRINT "None of us has any money left:":PRINT "Press space bar to continue...":WHILE INKEY$<>" ":WEND:GOTO 9000
5050 TURN=0:BET=0:AMOUNT1=0:AMOUNT=0:TOT1=0:TOT2=0:TOT3=0
5055 SO=0:Y=0:X=0:MAX=0
5090 GOSUB 55:CLS:GOTO 207
6000 FOR P=1 TO 500:NEXT
6001 IF ZX=1 THEN ZX=0:GOTO 400
6002 AMOUNT=AMOUNT1
6005 IF AMOUNT=20 THEN 600
6006 IF AMOUNT=21 THEN 600
6010 IF AMOUNT<10 THEN 400
6011 IF PLAYERS=3 AND AMOUNT>TOT1 AND AMOUNT>TOT2 THEN 600
6015 IF PLAYERS=1 AND BUST1=1 AND AMOUNT>2 AND AMOUNT<12 THEN 6100
6020 IF PLAYERS=3 AND BUST1=1 AND BUST2=1 AND AMOUNT>2 AND AMOUNT<12 THEN 6100
6025 IF PLAYERS=1 AND TOT1<AMOUNT THEN 6100
6030 IF PLAYERS=3 AND BUST1=1 AND TOT2<AMOUNT THEN 6100
6035 IF PLAYERS=3 AND TOT1<AMOUNT AND BUST2=1 THEN 6100
6040 IF PLAYERS=1 AND TOT1<14 THEN 400
6045 IF PLAYERS=3 AND TOT1<14 AND TOT2<14 THEN 400
6050 IF PLAYERS=1 AND TOT1<18 AND FIX(RND*10)>7 THEN 400
6055 IF PLAYERS=3 AND TOT1<18 AND TOT2<18 AND FIX(RND*10)>7 THEN 400
6060 IF PLAYERS=3 AND BUST1=1 AND TOT2>AMOUNT THEN 400
6065 IF PLAYERS=3 AND TOT1>AMOUNT AND BUST2=1 THEN 400
6070 IF PLAYERS=3 AND TOT1>AMOUNT AND BUST1=0 THEN 400
6075 IF PLAYERS=3 AND TOT2>AMOUNT AND BUST2=0 THEN 400
6080 IF PLAYERS=1 AND TOT1>AMOUNT AND BUST1=0 THEN 400
6081 IF PLAYERS=1 AND TOT1<AMOUNT THEN 600
6085 GOTO 600
6100 COLOR 14:LOCATE 21,1:PRINT "How much to add to the bet you placed:"
6101 FOR V=15 TO 10 STEP -.5:SOUND V*19,1,V,0:SOUND V*8,1,V,0:NEXT
6105 LOCATE 22,1:PRINT "How much $";:COLOR 2:FOR P=1 TO 800:NEXT
6110 QW=FIX(RND*CASH):IF QW<1 AND CASH>1 THEN 6110
6115 PRINT QW:ZX=1:MORE=QW:GOTO 725
8000 PLAY "A40B40A40":IF MAX=1 AND BET=0 THEN BET=CASH:COLOR 3:LOCATE 22,1:PRINT "Do that again max:";:COLOR 2:FOR P=1 TO 600:NEXT:PRINT BET:FOR P=1 TO 600:NEXT:LOCATE 22,1:PRINT STRING$(80,32):CASH=CASH-BET
8001 IF TURN=1 THEN CASH1=CASH1-BET:BET1=BET ELSE IF TURN=2 THEN BET2=BET:CASH2=CASH2-BET ELSE IF TURN=3 THEN CASH3=CASH3-BET:BET3=BET
8005 GOTO 260
9000 DECK=0:AMOUNT1=0:AMOUNT=0:SO=0:Y=0:X=0
9010 CASH1=100:CASH2=100:CASH3=100:LOST1=0:LOST2=0:LOST3=0:WIN1=0:WIN2=0:WIN3=0:BET1=0:BET2=0:BET3=0
9011 MAX=0
9015 GOSUB 55:GOTO 75
9100 NOISE 7,15,30:COLOR 7:LOCATE 1,1:PRINT "SUFFLING DECK":FOR SHUF=1 TO 50:FRST=FIX(RND*50):D1$=DECK$(FRST):NW=FIX(RND*50):DECK=NW:D2$=DECK$(DECK)
9101 SO=0:Y=0:X=0
9105 DECK$(FRST)=D2$:DECK$(NW)=D1$:NEXT:LOCATE 1,1:PRINT "             "
9106 MAX=0
9110 PLAYERS=2:FOR P=1 TO 15:PALETTE P,P:NEXT:TURN=0:AMOUNT=0:AMOUNT1=0:AMOUNT2=0:DECK=0:DECK=0:GOTO 206
9200 NOISE 7,15,30:COLOR 7:LOCATE 1,1:PRINT "SUFFLING DECK":FOR SHUF=1 TO 50:FRST=FIX(RND*50):D1$=DECK$(FRST):NW=FIX(RND*50):DECK=NW:D2$=DECK$(DECK)
9201 SO=0:Y=0:X=0
9202 MAX=0:DECK=0
9205 DECK$(FRST)=D2$:DECK$(NW)=D1$:NEXT:LOCATE 1,1:PRINT "             "
9210 PLAYERS=1:FOR P=1 TO 15:PALETTE P,P:NEXT:TURN=0:AMOUNT=0:AMOUNT1=0:AMOUNT2=0:DECK=0:CASH2=CASH3:WIN2=WIN3:LOST2=LOST3:BET=0:BT=0:PLAYERS=1:GOTO 207
9300 NOISE 7,15,30:COLOR 7:LOCATE 1,1:PRINT "SUFFLING DECK":FOR SHUF=1 TO 50:FRST=FIX(RND*50):D1$=DECK$(FRST):NW=FIX(RND*50):DECK=NW:D2$=DECK$(DECK)
9301 SO=0:Y=0:X=0
9305 DECK$(FRST)=D2$:DECK$(NW)=D1$:NEXT:LOCATE 1,1:PRINT "             ":DECK=0
9310 PLAYERS=1:FOR P=1 TO 15:PALETTE P,P:NEXT:TURN=0:AMOUNT=0:AMOUNT1=0:AMOUNT2=0:DECK=0:CASH1=CASH2:WIN1=WIN2:LOST1=LOST2:BET=0:CASH2=CASH3:WIN2=WIN3:LOST2=LOST3:GOTO 207
